<!DOCTYPE html>
<!--
/**
* @Author: Raymond
* @Date: 2020/7/13 17:08
* @Description:
* */
-->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="#(context)/static/jquery-3.5.1.min.js"></script>
</head>
<body style="text-align: center">
<h1>hello world</h1>
<a href="/detil/toadd">增加</a>
<div style="margin-left: 45%">
    <table style="text-align: center">
        <tbody>
        <thead>
        <th>ID</th>
        <th>name</th>
        <th>email</th>
        <th>address</th>
        </thead>
        #for(n : userList)
        <tr>
            <td>#(n.id)</td>
            <td>#(n.name)</td>
            <td>#(n.email)</td>
            <td>#(n.address)</td>
            <td><a href="/detil/toupdate/#(n.id)" >修改</a> <a href="/detil/delete/#(n.id)" >删除</a></td>
        </tr>
        #end
        </tbody>
    </table>
</div>

<script>
    // function add() {
    //     $.ajax({
    //         url: "/detil/toadd",
    //         type: "GET",
    //         dataType: "JSON",
    //         async: false,
    //         success: function (rus) {
    //             console.log(rus);
    //             if(rus.code == 100){
    //                 window.location.href("#(context)/index/add.html");
    //             }
    //         }
    //     })
    // }
</script>
</body>
</html>